package com.neuedu.security.controller;

import com.neuedu.security.model.DataModel;
import com.neuedu.security.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/data")
public class DataController {

    @Autowired
    DataService dataService;

    @GetMapping("/getDatas")
    public List<DataModel> getDatas(){
        return dataService.getDatas();
    }
}
